﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Hisuntech.SystemFramework.Net.Json;
using NBFModel;
using System.Data;
using System.Collections;

public partial class passwordtest_password : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }


    protected void Button1_Click(object sender, EventArgs e)
    {
        string productnumber = "1";
        string oldpassword = this.TextBox1.Text;
        string newpassword = this.TextBox2.Text;
        Model_tb_ManagePwd mtm = new Model_tb_ManagePwd();
        mtm.productNumber = productnumber;
        mtm.UserPwd = oldpassword;
        string url = "http://localhost:9162/PassWordService.svc/SetPassWord";
       //string url = "http://localhost:9162/PassWordService.svc/DoWork";
        Model_tb_ManagePwd im = new Model_tb_ManagePwd();
        im.NewPassWord = newpassword;
        im.productNumber = productnumber;
        im.UserPwd = oldpassword;
        string reslet = JSONClient.PostData<Model_tb_ManagePwd, string>(url, im);
        Response.Write("<script>alert('"+reslet+"');</script>");
        //string result = JSONClient.PostData< string,string>(url,"test");
    }



}
